home *** CD-ROM | disk | FTP | other *** search
/ Celestin Apprentice 4 / Apprentice-Release4.iso / Languages / Mops 2.7 / Mops Manual / Part I.srd / Part I.srd.rsrc / PICT_58.png < prev    next >
Portable Network Graphic  |  1996-01-02  |  58KB  |  816x1056  |  8-bit (256 colors)
Labels: book | reckoner | sky
OCR: I-54 Mops Tutorial Mops's shortcut for this multiple decision making is the CASE structure Using the example above you endd define word like this: CaseTest Print OML SIX, SEVEN OTHER CASE OF TWO ENDOF OF SIX ENDOF OF SEVEN ENDOF OTHER ENDCASE This word ta kes the number on the stack and checks whet ther i 1 i s CASE OF par icul ar CASE is val: id then the branch execut tes stat tements unt. enco del: imiter that point, executi .on jumps to ENDCA SE ignor ing all other the cases are valid, then execut. on cont inues toward the ENDCASE del imi ter inserted be fore ENDCASE OTHER n the exampl e then execu test of cases fa tatemen de fau SIINE tiemant tthee the statemer wh ich gets execu ted by de fault if nothing else does Note part: icul larly, that the CASE test retains the test value uo the ...